package cn.gok.test;

import cn.gok.entity.Student;
import cn.gok.entity.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
    测试set注入和构造器注入
 */

public class SpringTest05 {
    public static void main(String[] args) throws InterruptedException {
        ApplicationContext app  = new ClassPathXmlApplicationContext("application02.xml");
        Student student = app.getBean("student", Student.class);
        System.out.println(student);


        Student student1 = app.getBean("student1", Student.class);
        System.out.println(student1);


        Student student2 = app.getBean("student2", Student.class);
        System.out.println(student2);
    }
}
